# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pysqlite-legacy
_pkgname=pysqlite
pkgver=1.0.1
pkgrel=7
pkgdesc='Python DB-API 2.0 interface for the legacy SQLite 2.'
arch=('x86_64' 'aarch64')
url='https://initd.org/tracker/pysqlite'
replaces=('python-pysqlite-legacy')
license=('custom:unknown')
depends=('python2' 'sqlite2')
source=("http://www.mirrorservice.org/pub/minix/distfiles/backup/$_pkgname-$pkgver.tar.gz")
sha512sums=('4e156ea0ed888bb3d215edc678cc57b9943363703da995c142837488510ed333a121987f865b4f8553852ec2a221c08b5bd56ef6fee7d70683de9485d185ca94')

build() {
  cd $_pkgname

  python2 setup.py build
}

package() {
  cd $_pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

